package fun.sboy.headacheMemo.controller;

import fun.sboy.headacheMemo.entry.TaskTodoProgress;
import fun.sboy.headacheMemo.service.TaskTodoProgressService;
import fun.sboy.headacheMemo.util.ResultUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/taskTodoProgress")
public class TaskTodoProgressController {

    @Autowired
    private TaskTodoProgressService taskTodoProgressService;

    @GetMapping("/{tlId}")
    public ResultUtils getTaskTodoProgress(@PathVariable("tlId") String tlId) {
        TaskTodoProgress taskTodoProgress = taskTodoProgressService.selectByTaskTodoId(tlId);
        return ResultUtils.success(taskTodoProgress);
    }
}
